package network.tprt2;

import java.net.DatagramPacket;
import java.net.InetAddress;

import network.Message;

import network.AbstractUserSignal;

public class UserSignalRT2 extends AbstractUserSignal {
	
	private Message signal ;
	
	public UserSignalRT2(DatagramPacket packet) {
		super(packet);
		this.signal = Message.deserialiserMessage(packet.getData()) ;
	}

	public UserSignalRT2(Message msg, InetAddress address) {
		super(address);
		this.signal = msg ;
	}
	
	public Message getSignal () {
		return this.signal ;
	}

	@Override
	public byte[] serialize() {
		return this.signal.serialiserMessage();
	}

}
